package com.szrt.day20170504.ch03;

public class StringThread implements Runnable {

	@Override
	public void run() {
		
		
		
		//上一把锁?
		synchronized (this) {
			String str="zhongshenruantong";
			for(int index =0 ;index<str.length();index++){
				System.out.print(str.charAt(index));
				
				try {
					Thread.currentThread().sleep(500);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}
		}
		
		
	}

}
